<html>
	<head>
		<script src="../gears_init.js"></script>
		<script src="../GearsORM.js"></script>
		<script src="../GearsORM.Events.js"></script>
		<script src="../GearsORM.ResultIterator.js"></script>
		<script src="../GearsORM.Sql.js"></script>
		<script src="../GearsORM.Fields.js"></script>
		<script src="../GearsORM.Model.js"></script>
		<script src="../GearsORM.Introspection.js"></script>
		<script src="../GearsORM.Transaction.js"></script>
		<script>
			GearsORM.dbName = "test.introspection";
			var Model1 = new GearsORM.Model({
				name:"Model1",
				fields:
				{
					name:new GearsORM.Fields.String({maxLength:25})
				}
			});
			var Model2 = new GearsORM.Model({
				name:"Model2",
				fields:
				{
					name:new GearsORM.Fields.String({maxLength:25})
				}
			});
			
			var Tests =
			{
				up:function()
				{
					Model1.dropTable();
					Model2.dropTable();
				},
				"test if doesTableExist work":function()
				{
					UnitTest.assertFalse(GearsORM.Introspection.doesTableExist("Model1","Model2"));
					Model1.createTable();
					UnitTest.assertTrue(GearsORM.Introspection.doesTableExist("Model1"));
					Model2.createTable();
					UnitTest.assertTrue(GearsORM.Introspection.doesTableExist("Model2"));
					UnitTest.assertTrue(GearsORM.Introspection.doesTableExist("Model1","Model2"));
				},
				down:function()
				{
					Model1.dropTable();
					Model2.dropTable();
				}
			};
		</script>
		<script src="unit_test.js"></script>
	</head>
	<body>
		
	</body>
</html>